
<?php
require("conn.php");
$username=$_POST['username'];
$sql="SELECT * FROM thanh_vien where username='$username'";
$bang=mysql_query($sql);
$row=mysql_fetch_array($bang)
?>
<style type="text/css">
<!--
.style1 {
	color: #0000FF;
	font-size: 24px;
	font-weight: bold;
}
.style5 {font-size: 18px}
.style6 {color: #0000FF; font-size: 18px; }
-->
</style>
<form action="" method="get" enctype="multipart/form-data" name="f" id="f">
<input name="usnc" type="hidden" id="usnc" value="<?php echo $row['username']; ?> " />
  <table width="1187" border="1">
  <tr>
      <td colspan="3"><div align="left" class="style1">Cập nhật thành viên </div></td>
    </tr>
    <tr>
      <td width="95">&nbsp;</td>
      <td width="282"><span class="style5"><span class="style4">
        <label>
        <div align="left" class="style6">THÔNG TIN TRƯỚC KHI SỮA </div>
        <span class="style6">
        </label>
      </span></td>
      <td width="788"><span class="style5"><span class="style4">
        <label>
        <div align="left" class="style6">THÔNG TIN SAU KHI SỮA </div>
          <span class="style6">
          </label>
          </span></td>
    </tr>
	<tr>
      <td width="95"><div align="left"><strong>Tài khoản </strong></div></td>
      <td width="282"><label>
        <div align="left">
          <?php echo $row['username']; ?>        </div>
      </label></td>
      <td width="788"><label>
          <div align="left">
            <input name="tk" type="text" id="tk" size="40" value="<?php echo $row['username']; ?>" />
          </div>
      </label></td>
    </tr>
    <tr>
      <td><div align="left"><strong>Mật khẩu </strong></div></td>
      <td><div align="left">
        <?php echo $row['pass']; ?>
      </div></td>
      <td><div align="left">
          <input name="mk" type="text" id="mk" size="40" value="<?php echo $row['pass']; ?>" />
      </div></td>
    </tr>
    <tr>
      <td><div align="left"><strong>Tiền</strong></div></td>
      <td><div align="left">
        <?php echo $row['tien']; ?>
      </div></td>
      <td><div align="left">
          <input name="t" type="text" id="t" size="40" value="<?php echo $row['tien']; ?>" />
      </div></td>
    </tr>
    <tr>
      <td><div align="left"><strong>Lock</strong></div></td>
      <td><div align="left">
        <label>
        <select name="loc" id="loc">
          <option value="yes"  <?php if($row['lock']=="yes"){ echo('selected="selected"');}?>>Khóa lại</option>
		  <option value="no" <?php if($row['lock']=="no") {echo('selected="selected"');}?>>Mở khóa</option>
        </select>
        </label>
      </div></td>
      <td><div align="left">
          <label>
          <select name="lock" id="lock">
            <option value="yes"  <?php if($row['lock']=="yes"){ echo('selected="selected"');}?>>Khóa lại</option>
            <option value="no" <?php if($row['lock']=="no") {echo('selected="selected"');}?>>Mở khóa</option>
          </select>
          </label>
      </div></td>
    </tr>
    <tr>
      <td><div align="left"><strong>Tên thật </strong></div></td>
      <td><div align="left">
        <?php echo $row['ten']; ?>
      </div></td>
      <td><div align="left">
          <input name="ten" type="text" id="ten" size="40" value="<?php echo $row['ten']; ?>" />
      </div></td>
    </tr>
    <tr>
      <td><div align="left"><strong>Ngày sinh </strong></div></td>
      <td><div align="left">
       <?php echo $row['ngaysinh']; ?>
      </div></td>
      <td><div align="left">
          <input name="ns" type="text" id="ns" size="40" value="<?php echo $row['ngaysinh']; ?>" />
      </div></td>
    </tr>
    <tr>
      <td><div align="left"><strong>Điện thoại </strong></div></td>
      <td><div align="left">
       <?php echo $row['dienthoai']; ?>
      </div></td>
      <td><div align="left">
          <input name="dt" type="text" id="dt" size="40" value="<?php echo $row['dienthoai']; ?>" />
      </div></td>
    </tr>
    <tr>
      <td><div align="left"><strong>Email</strong></div></td>
      <td><div align="left">
        <?php echo $row['email']; ?>
      </div></td>
      <td><div align="left">
          <input name="em" type="text" id="em" size="40" value="<?php echo $row['email']; ?>" />
      </div></td>
    </tr>
    <tr>
      <td valign="top"><div align="left"><strong>Mô tả </strong></div></td>
      <td valign="top"><label>
        <div align="left">
          <?php echo $row['Mota']; ?>        </div>
      </label></td>
      <td><label>
          <div align="left">
            <textarea name="mt" cols="90" rows="7" id="mt"><?php echo $row['Mota']; ?></textarea>
          </div>
        </label></td>
    </tr>
    <tr>
      <td><div align="left"><strong>Giới tinh </strong></div></td>
      <td><label>
        <div align="left">
          <?php 
		  if($row['gioitinh']=='yes')
		  {
		   echo('Nam');
		  }
		   else if($row['gioitinh']=='no')
		  {
		   echo('Nữ');
		  }
		  if($row['gioitinh']=='khac')
		  {
		   echo('Giới tính khác');
		  }
		  
		   ?>
        </div>
      </label></td>
      <td><label>
          <div align="left">
            <select name="gt" id="gt">
              <option value="yes"  <?php if($row['gioitinh']=='yes') echo('selected="selected"');?>>Nam</option>
              <option value="no" <?php if($row['gioitinh']=='no') echo('selected="selected"');?>>Nữ</option>
              <option value="no" <?php if($row['gioitinh']=='khac') echo('selected="selected"');?>>Giới tính khác</option>
            </select>
          </div>
        </label></td>
    </tr>
    <tr>
      <td><div align="left"><strong>Ngày trở lại </strong></div></td>
      <td><div align="left">
        <?php echo $row['ngaytrolai']; ?>
      </div></td>
      <td><div align="left">
          <input name="ntl" type="text" id="ntl" size="40" value="<?php echo $row['ngaytrolai']; ?>" />
      </div></td>
    </tr>
    <tr>
      <td colspan="3"><label>
        <div align="center">
          <input type="button" name="Button" value="Đồng ý thay đổi thông tin trên" onclick="xulysuathanhvien()" />
          <input type="reset" name="Submit2" value="Hủy bỏ các thiết lập thay đổi trên" />
        </div>
      </label></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
  </table>

</form>